xen/arm: domain_build: allocate lowmem for dom0 as much as possible
authorPeng Fan <peng.fan@nxp.com>
Fri, 23 Sep 2016 02:55:34 +0000 (10:55 +0800)
committerStefano Stabellini <sstabellini@kernel.org>
Tue, 6 Dec 2016 18:32:11 +0000 (10:32 -0800)
commitab5b00ab4958279acbcad6f3c7e1396c94b38f4a
tree05b803bd829b80494f3d6ab08d65a48244041262
parentc655b112fb5fd677e0943dafaa1071501f8fc190
xen/arm: domain_build: allocate lowmem for dom0 as much as possible

On AArch64 SoCs, some IPs may only have the capability to access
32 bits address space. The physical memory assigned for Dom0 maybe
not in 4GB address space, then the IPs will not work properly.
So need to allocate memory under 4GB for Dom0.

There is no restriction that how much lowmem needs to be allocated for
Dom0 ,so allocate lowmem as much as possible for Dom0.

This patch does not affect 32-bit domain, because Variable "lowmem" is
set to true at the beginning. If failed to allocate bank0 under 4GB,
need to panic for 32-bit domain, because 32-bit domain requires bank0
be allocated under 4GB.

For 64-bit domain, set "lowmem" to false, and continue allocating
memory from above 4GB.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Julien Grall <julien.grall@arm.com>
xen/arch/arm/domain_build.c